from api.ihrm_uid_api import TestUID
from common.ihrm_login_assert import Test_ihrm


class TOKEN:
    @classmethod
    def token_get(cls):
        body = {"mobile": "13800000002", "password": "123456"}
        res = TestUID.login_ihrm(body)
        Test_ihrm.test_assert(res, 200, True, 10000, '操作成功！')
        token = res.json().get("data")
        return token
